<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>个人中心</title>
		<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, maximum-scale=1.0, user-scalable=no" />
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../css/mui.min.css">
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/jquery-1.8.3.min.js"></script>
		<style>
			*{
				margin: 0px;
				border: 0px;
				padding: 0px;
			}
			html,
			body {
				font-family: "黑体";
				color: #616161;
			}
			
			.certificate{
				background-image: url(../../img/grzx/shanggangzheng_03.png);
				background-repeat: no-repeat;
				background-size: 100%;
				height: 180px;
				width: 280px;
				margin-left: 13%;
			}
		</style>
	</head>
	<body style="height: 100%; width: 100%; background-color: white;">
		<!--<nav id="nav_dbdh" class="mui-bar mui-bar-tab" style="background-color: #F1ecdf; height: 46px; font-size: 15px;">
			<a id="defaultTab" class="mui-tab-item">
				<img id="sp_zy" src="../../img/index/home48-before_03.png" style="height: 22px; width: 24px; margin-top: 9px;"  />
				<span class="mui-tab-label" style="margin-top: -2px; margin-left: -14px; display: block;">&nbsp;&nbsp;&nbsp;主页</span>
			</a>

			<a id="dv_bar_wxy" class="mui-tab-item">
				<img id="sp_wxy" src="../../img/index/mini46-before_06.png" style="height: 22px; width: 24px; margin-top: 9px;" />
				<span class="mui-tab-label" style="margin-top: -2px; margin-left: -10px; display: block;">&nbsp;&nbsp;微校园</span>
			</a>

			<a id="dv_bar_grzx" class="mui-tab-item mui-active">
				<img id="sp_grzx" src="../../img/index/icon_03.png" style="height: 22px; width: 24px; margin-top: 9px;"  />
				<span class="mui-tab-label" style="margin-top: -2px; margin-left: -12px; display: block;">个人中心</span>
			</a>
		</nav>
		<script>
			var $userLogin = JSON.parse(localStorage.getItem("login-user-parent"));
			/**
			 * 监听底部导航事件，用于更改其背景图标
			 */
			document.getElementById("defaultTab").addEventListener("tap", function() {
				window.title = "家长学校";
				document.getElementById("sp_zy").src = "../../img/index/home-48_03.png";
				document.getElementById("sp_wxy").src = "../../img/index/mini46-before_06.png";
				document.getElementById("sp_grzx").src = "../../img/index/personal46_10.png";
				mui.openWindow({
					url : "../../family-index.html"
				});
			});

			document.getElementById("dv_bar_wxy").addEventListener("tap", function() {
				window.title = "微校园"
				document.getElementById("sp_zy").src = "../../img/index/home48-before_03.png";
				document.getElementById("sp_wxy").src = "../../img/index/mini46_06.png";
				document.getElementById("sp_grzx").src = "../../img/index/personal46_10.png";
				mui.openWindow({
					url : "../wxy/wxy-index.html"
				});
			}); 

			document.getElementById("dv_bar_grzx").addEventListener("tap", function() {
				window.title = "个人中心"
				document.getElementById("sp_zy").src = "../../img/index/home48-before_03.png";
				document.getElementById("sp_wxy").src = "../../img/index/mini46-before_06.png";
				document.getElementById("sp_grzx").src = "../../img/index/icon_03.png";
			});
		</script>-->
		<div class="mui-content" style="background-color: white;">
				<!--
            	作者：xuzhao_deng@sina.com
            	时间：2016-12-01
            	描述：个人中心内容
            -->
            <div id="dvcertificate">
            	<div id="bb-type"></div>
            	<div class="certificate" style="">
            		<div style="text-align: center; padding-top: 44px;">
						<div style="text-align: center; margin:2px auto 0px auto;">
							<h4 style="font-size: 17px; color: #D52222;">上岗证书</h4>
							<h5 style="display: block; font-size: 16px; color: #909090; margin-top: 8px;">恭喜你已成为本宇宙</h5>
							<h5 style="display: block; font-size: 16px; color: #909090;">第<span id="ranking">10000</span>位合格父母</h5>
						</div>
						<div style="margin-left: 180px;">
							<span id="structure" style="display: block; font-size: 11px; color: #909090;">345教育</span>
							<span id="issueTime" style="display: block; font-size: 11px; color: #909090; margin-top: -7px;">2016-12-12</span>
						</div>
					</div>
            	</div>
            </div>
            
            
			<div id="personalcentere-content" class="" style="font-size: 18px; margin-top: 10px;">
				<div id="dv_my_lst" style="color: #515151; width: 100%;">

					<ul class="mui-table-view mui-table-view-chevron" style="line-height: 20px; margin-top: 20px;">
						<li class="mui-table-view-cell" style="margin-left: 0px;">
							<a href="manage345.html?tab=pc" class="mui-navigate-right">345管理</a>
						</li>
						<!--<li class="mui-table-view-cell" style="margin-left: 40px;">
							<a href="" class="mui-navigate-right">我的提醒</a>
						</li>-->
						<li class="mui-table-view-cell" style="margin-left: 0px;">
							<a href="my-news.html" class="mui-navigate-right">我的消息</a>
						</li>
						<!--<li class="mui-table-view-cell" style="margin-left: 40px;">
							<a href="" class="mui-navigate-right">我的帖子</a>
						</li>-->
						<li class="mui-table-view-cell" style="margin-left: 0px;">
							<a href="my-collection.html" class="mui-navigate-right">我的收藏</a>
						</li>
						<!--<li class="mui-table-view-cell" style="margin-left: 40px;">
							<a href="" class="mui-navigate-right">我的积分</a>
						</li>-->
					</ul>
					<img src="../../img/grzx/jiangexian_02.png" style="width: 100%;" />
					<ul class="mui-table-view mui-table-view-chevron" style="line-height: 20px;">
						<li class="mui-table-view-cell" style="margin-left: 0px;">
							<a href="my-information.html" class="mui-navigate-right">设置</a>
						</li>
						<li class="mui-table-view-cell" style="margin-left: 0px;">
							<a href="feedback.html" class="mui-navigate-right">我要反馈</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
	</body>
	<script src="../../js/bus/pubfun.js"></script>
	<script src="../../js/utils/http.utils.js"></script>
	<script>
	
		var $wxfwid = localStorage.getItem("wxfwid");
		if($wxfwid == null || $wxfwid == ""){
			var $orgId = getQueryString(window.location.search, "orgId");
			localStorage.setItem("wxfwid", $orgId);
		}
		
		var $userLogin = JSON.parse(localStorage.getItem("login-user-parent"));
		window.onload = function(){
			
			if($userLogin !== null && $userLogin !== undefined && $userLogin !== "") {
				if($userLogin.nickName != null && $userLogin.nickName != ""){
					document.getElementById("sp-fam-userName").innerHTML = $userLogin.nickName;
				} else {
					document.getElementById("sp-fam-userName").innerHTML = "鹰妈妈";
				}
			} else {
				//mui.openWindow({
				//	url: "../../login.html"
				//});
			}
		}
		
		function getPostsRanking(){
			mui.ajax({
				url: $request_url.getPostsRanking,
				type: "get",
				headers: {
					"Authorization": $headers_authorization
				},
				data: {
					userId : $userLogin.userId
				},
				dataType: "json",
				success: function(dat) {
					if(dat.code == 0){
						document.getElementById("ranking").innerHTML = dat.result.orderNumber;
						document.getElementById("structure").innerHTML = dat.result.issueOrg;
						document.getElementById("issueTime").innerHTML = stringConTime(dat.result.issueTime, "ymd");
					}
				}, error : function(err){
					
				}
			});
		}
	</script>
</html>
